<?php use_helper('Date') ?>
<?php use_helper('Text') ?>
<?php slot('title') ?>
  <?php echo sprintf('%s - ', $article->getTitle()) ?>
<?php end_slot() ?>
<!--导航-->
<div class="menu" id="topmenu">
  <ul>
    <li><?php echo link_to('首页', '@homepage'); ?></li>
    <li><?php echo link_to('艺海简介', '@html_about'); ?></li>
    <li><?php echo link_to('拍卖预告', '@article_category?catid=3'); ?></li>
    <li class="current"><?php echo link_to('艺海资讯', '@article'); ?></li>
    <li><?php echo link_to('精彩照片', '@album'); ?></li>
    <li><?php echo link_to('艺海视频', '@video'); ?></li>
    <li class="clear_bg"><?php echo link_to('业务联系', '@message'); ?></li>
  </ul>
</div>
<!--主内容-->
<div class="sale clearfix">
   <div class="art_left">
      <div class="art_nav art_font">当前位置：<a href="<?php echo url_for('@article_category?catid=' . $article->getCategoryId()) ?>"><?php echo $category ?></a> > 正文</div>
         <h2 class="art_left_h2"><?php echo $article->getTitle() ?></h2>
         <h4><?php echo $article->getCreatedAt() ?>
		 <?php if (($ref = $article->getReference()) && ($url = $article->getReferenceUrl())): ?>
          <a href="<?php echo $url ?>"><?php echo $ref ?></a>
        <?php elseif ($ref): ?>
          <?php echo $ref ?>
        <?php else: ?>
          原创
        <?php endif ?></h4>
      <div class="art_cont">
			<?php echo html_entity_decode($article->getContent()) ?>
      </div>
     <?php if (($attachment = $article->getAttachment())): ?>
	  <div class="art_down"><a href="<?php printf(sfConfig::get('app_path_attachment_files'), $article->getAttachment()) ?>">下载 <?php echo $article->getAttachment() ?></a></div>
	  <?php endif ?>
	  <div class="art_title"><h3>相关新闻</h3></div>
      <div class="art_conts">
	  <?php if (@count($relatedarticles)){ ?>
    <ul>
         <?php foreach ($relatedarticles as $article): ?>
            <li><span><?php echo format_date($article->getCreatedAt(), 'yyyy-MM-dd'); ?></span><a href="<?php echo url_for('@article_show?id=' . $article->getId()) ?>"><?php echo $article->getTitle() ?></a></li>
			   <?php endforeach ?> 
         </ul>
	  <?php } else {echo "没有相关新闻";} ?>
    </div>
   </div>
   
   <div class="sale_right">
   <?php if($ad): ?>
      <a href="<?php echo $ad->getLink() ?>"><img src="<?php printf(sfConfig::get('app_path_ad_image'), $ad->getImage()) ?>" width="285" height="110" alt="<?php echo $ad->getTitle() ?>" /></a>
   <?php endif?>
      <div class="sale_topics_title"><span><a href="<?php echo url_for('@topic') ?>">更多</a></span><h3>拍卖专题<em> >></em></h3></div>
      <div class="sale_topics_cont">
          <ul><?php foreach ($specials as $special): ?>
             <li><a href="<?php echo url_for('topic/show?id='.$special->getId()) ?>"><?php echo $special->getName() ?></a></li>
			<?php endforeach ?> 
          </ul>
      </div>
   </div>
</div>